Word Completion

There is a clever word completion mechanism in HTML mode which saves you keystrokes and time while typing. It also helps you to make sure no tags are misspelt.

Note! The word completion mechanism requires that the package Elec Completions is activated. To activate it make sure Elec Completions is checked in the dialog Config->Preferences->Features...

As explained elsewhere you can use either dialog windows or the status bar to insert new tags, but perhaps you prefer simply to type them. Then the word completion mechanism can help you. Word completion is bound to ctrl-tab. (In Alpha 7.3 it is bound to cmd-tab, but this has been changed as it conflicts with Mac OS binding for switching between applications.)

Tip: If you prefer another key binding to ctrl-tab for word completion you can change it using Config->Special Keys...

How word completion works is best explained with an example. Let us say you want to type a TABLE tag. First type

<ta

If you now hit ctrl-tab this is expanded to

<TABLE|></TABLE>

Alpha sees that you have typed "ta" and finds that TABLE is the only HTML element beginning by "TA" and therefore completes "TA" to "TABLE". Alpha also automatically inserts a closing tag.

Then you perhaps want the attribute CELLSPACING. Type the first few letters

<TABLE ce|></TABLE>

and hit ctrl-tab again. In this case there are two attributes beginning by "CE", CELLSPACING and CELLPADDING. If the preference, which is somewhat cryptically called List Pick If Mult Cmps is checked in the dialog Config->Preferences->Completions then Alpha opens a window where you can choose which of the two attributes you want. Alpha then completes "ce" to

<TABLE CELLSPACING="|"></TABLE>

You can now type the value you want for CELLSPACING hit tab and write the next attribute.

If List Pick If Mult Cmps is not checked Alpha will only complete "ce" to "CELL" as it does not know which attribute you want.

<TABLE CELL|>•
    •
</TABLE>

Word completion when typing attribute values

You can also use word completion to expand some attribute values. The types for which this is possible are:

Let us illustrate this with an example. Say you want the color "yellow" as the value of the COLOR attribute of a FONT element. Hitting ctrl-tab after you have typed

<FONT COLOR="ye|">

makes Alpha complete this to

<FONT COLOR="#FFFF00">

Word completion when editing CSS and JavaScript

Word completion can also help you when you are editing CSS and JavaScript. See the CSS and JavaScript sections.

Previous page Table of contents Next page